<%@ page language="java" import="java.util.*,entity.*,dao.*,dao.impl.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html>
    <head>
        <title>
            北京科技大学天津学院校园论坛-注册
        </title>
        <meta name="author" content="梁龙">
        <style>
             *{margin:0;padding:0;}  
            .divhead{
                    height:100px; 
                    text-align: center;
                /* border:5px solid red; */
                    line-height:100px;
            }
            .divhead>p{
                text-shadow:#FF0000 0 0 10px;
                color:black;
                font-size:60px
            }
            .divtable{
                /* border:5px solid gray; */
                /* margin-left:100px; */
                margin:auto;
                color:black;
                width:500px;
                height:200px;
            }
            .input1{
                border-radius: 5px;
				border: 1px solid #D7D7D7;
				height: 30px;
				width: 300px;
                margin-left:50px;
            }

            .td-left{
                text-align: right;
            }
            td-right{
                text-align:left;
                
            }
            .imgtable{
                /* border:2px solid blue; */
                width:800;
                height:300px;
                color:aqua;
                margin:auto;
            }
            img{
                height:100px;
                width:100px;
            }
        </style>
        <script language="javascript">
            windows.onload =function(){
                document.getElementById("form1").onsubmit = function(){
                    return checkusername();
                }
            }
            function checkusername() {
                var uname =document.getElementsById("uname").value;
                var reg_uname=/^\w{6,12}$/;
                var flag =reg_uname.test(uname); 
                var s_username =document.getElementById("s_username");
                if(flag){
                    s_username.innerHTML = "用户名输入正确";
                }else{
                    s_username.innerHTML = "用户名格式有误";
                }
                return flag;             
            }
        </script>
    </head>
    <body background="img/background.jpg">

        <div class="divhead">
            <p>北京科技大学天津学院BBS注册</p>
        </div>
        <div >
            <form id ="form1" name="regForm"  onsubmit="return check()" method ="post" action="manage/doReg.jsp">
                <table class="divtable">
                    <tr>
                        <td class="td-left">用户名</td>
                        <td class="td-right"><input class="input1" name="userName" id="uname">
                        <span id="s_username"></span>
                        </td>

                    </tr>
                    <tr>
                        <td class="td-left">密码</td>
                        <td class="td-right"><input type="password" maxlength="8" class="input1" name="userPass"></td>
                    </tr>
                    <tr>
                        <td class="td-left">重复密码</td>
                        <td class="td-right"><input type="password" maxlength="8" class="input1" name="userPass2"></td>
                    </tr>
                    <tr>
                        <td class="td_left"><label>性别</label></td>
                        <td class="td_right">
                            <input type="radio" name="gender" value="2" checked> 男
                            <input type="radio" name="gender" value="1"> 女
                        </td>
                    </tr>
                    <!-- <tr><td>请选择头像</td></tr> -->
                </table> 
                <table class="imgtable">
                    <tr><td>请选择头像</td></tr>
                    <tr>
                        <td><input type="radio"name="head"  value="头像.jpeg"/><img src="img/头像.jpeg"></td>
                        <td><input type="radio" name="head" value="头像1.jpeg" /><img src="img/头像1.jpeg"></td>
                        <td><input type="radio" name="head" value="头像2.jpeg"/><img src="img/头像2.jpeg"></td>
                        <td><input type="radio" name="head" value="头像3.jpeg" /><img src="img/头像3.jpeg"></td>
                        <td><input type="radio" name="head" value="头像4.jpeg" /><img src="img/头像4.jpeg"></td>
                        <td><input type="radio" name="head" value="头像5.jpeg"/><img src="img/头像5.jpeg"></td>
                    </tr>
                    <tr>
                        <td><input type="radio"name="head"  value="头像6.jpeg"/><img src="img/头像6.jfif"></td>
                        <td><input type="radio" name="head" value="头像7.jpeg"/><img src="img/头像7.jfif"></td>
                        <td><input type="radio" name="head" value="头像8.jpeg"/><img src="img/头像8.jfif"></td>
                        <td><input type="radio" name="head" value="头像9.jpeg" /><img src="img/头像9.jfif"></td>
                        <td><input type="radio" name="head" value="头像10.jpeg"/><img src="img/头像10.jpg"></td>
                        <td><input type="radio" name="head" value="头像11.jpeg"/><img src="img/头像11.jfif"></td>
                    </tr>
                    <tr><td colspan="6" align="center"><input type="submit" name="button" id ="button" value="注册" />
                    </td></tr>
                </table>
            </form>
        </div>
            
    </body>
</html>
